
<title><?php echo $projectName?> - <?php echo TITLE_DEVELOPER;?></title>
<link rel="stylesheet" href="<?php echo URL_ASSET_ROOT;?>css/private/item/list.css">

<div class="middle">
    <div class="middle-section">
        <div class="middle-container">

            <input type="hidden" id="project_id_input" value="<?php echo $projectId;?>">
            <input type="hidden" id="token_input" value="<?php echo $token;?>">
            <input type="hidden" id="domain_input" value="<?php echo $domain;?>">

            <div class="project-name">
                <?php echo $projectName?>
            </div>

            <div class="project-link form-inline">
                <label class="project-link-label"><?php
                    if($projectLink) {
                        echo '链接地址：<a href="'.$projectLink.'" target="blank">'.$projectLink.'</a>';
                    }
                    ?></label>
            </div>

            <div class="project-file">

                <div class="project-file-upload form-inline">
                    <button id="upload_data_btn" class="btn btn-default btn-lg">+ 上传配置</button>
                    <button id="upload_image_btn" class="btn btn-default btn-lg">+ 上传图片（可多选）</button>
                    <button id="upload_logo_btn" class="btn btn-default btn-lg">+ 上传Logo</button>
                    <button id="upload_music_btn" class="btn btn-default btn-lg">+ 上传音乐</button>
                    <a href="<?php echo URL_ITEM_LINK.'/projectId/'.$projectId;?>">
                        <button id="generate_link_btn" class="btn btn-default btn-lg link_btn">路径规划 ></button>
                    </a>
                </div>

                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane fade in active" id="demo" aria-labelledby="demo-tab">
                        <div class="row">
                            <div class="col-md-12"><table class="table table-striped table-hover text-left" style="margin-top:40px;">
<?php

if($projectDataName || $projectLogoName || $projectMusicName || $projectImageList) {
    echo '
        <thead>
            <tr>
                <th class="col-md-1 project-list-title">编号</th>
                <th class="col-md-3 project-list-title">文件名称</th>
                <th class="col-md-1 project-list-title">文件类型</th>
                <th class="col-md-2 project-list-title">创建时间</th>
                <th class="col-md-1 project-list-title">操作</th>
            </tr>
        </thead>
    ';
}

if($projectDataName) {

    echo '
            <tr>
                <th class="col-md-1 project-list-num">~</th>
                <th class="col-md-3 project-list-name">'.$projectDataName.'</th>
                <th class="col-md-1 project-list-time">配置文件</th>
                <th class="col-md-2 project-list-time">'.date('Y-m-d H:i:s', $projectDataTime).'</th>
                <th class="col-md-1 project-list-operate">
                    <a href="/item/delete/projectId/'.$projectId.'/fileId/'.$dataFileId.'">
                        <button type="button" class="btn btn-default btn-xs" style="outline: none">删除</button>
                    </a>
                </th>
            </tr>
        ';
}

if($projectLogoName) {

    echo '
            <tr>
                <th class="col-md-1 project-list-num">~</th>
                <th class="col-md-3 project-list-name">
                <a class="navbar-link" href="'.URL_FILE_ROOT.$projectId.'/'.basename($projectLogoUrl).'" target="blank">'.$projectLogoName.'</a>
                </th>
                <th class="col-md-1 project-list-time">logo</th>
                <th class="col-md-2 project-list-time">'.date('Y-m-d H:i:s', $projectLogoTime).'</th>
                <th class="col-md-1 project-list-operate">
                    <a href="/item/delete/projectId/'.$projectId.'/fileId/'.$logoFileId.'">
                        <button type="button" class="btn btn-default btn-xs" style="outline: none">删除</button>
                    </a>
                </th>
            </tr>
        ';
}

if($projectMusicName) {

    echo '
            <tr>
                <th class="col-md-1 project-list-num">~</th>
                <th class="col-md-3 project-list-name">
                <a class="navbar-link" href="'.URL_FILE_ROOT.$projectId.'/'.basename($projectMusicUrl).'" target="blank">'.$projectMusicName.'</a>
                </th>
                <th class="col-md-1 project-list-time">音乐</th>
                <th class="col-md-2 project-list-time">'.date('Y-m-d H:i:s', $projectMusicTime).'</th>
                <th class="col-md-1 project-list-operate">
                    <a href="/item/delete/projectId/'.$projectId.'/fileId/'.$musicFileId.'">
                        <button type="button" class="btn btn-default btn-xs" style="outline: none">删除</button>
                    </a>
                </th>
            </tr>
        ';
}

if($projectImageList) {
    foreach($projectImageList as $key => $value) {
        echo '
            <tr>
                <th class="col-md-1 project-list-num">'.$key.'</th>
                <th class="col-md-3 project-list-name">
                    <a class="navbar-link" href="'.$value->url.'" target="blank">'.$value->name.'</a>
                </th>
                <th class="col-md-1 project-list-time">图片</th>
                <th class="col-md-2 project-list-time">'.date('Y-m-d H:i:s', $value->time).'</th>
                <th class="col-md-1 project-list-operate">
                    <a href="/item/delete/projectId/'.$projectId.'/fileId/'.$value->id.'">
                        <button type="button" class="btn btn-default btn-xs" style="outline: none">删除</button>
                    </a>
                </th>
            </tr>
        ';
    }
}

?>
                            </table></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="cover" class="cover">
    <div id="note_container" class="note_container"></div>
</div>

<script type="text/javascript" src="<?php echo URL_ASSET_ROOT;?>js/lib/jquery/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="<?php echo URL_ASSET_ROOT;?>js/lib/bootstrap/bootstrap-3.3.7.min.js"></script>
<script type="text/javascript" src="<?php echo URL_ASSET_ROOT;?>js/lib/md5/md5-2.3.0.min.js"></script>
<script type="text/javascript" src="<?php echo URL_ASSET_ROOT;?>js/lib/plupload/plupload-2.1.1.full.min.js"></script>
<script type="text/javascript" src="<?php echo URL_ASSET_ROOT;?>js/lib/qiniu/qiniu-1.0.16.min.js"></script>
<script type="text/javascript" src="<?php echo URL_ASSET_ROOT;?>js/private/item/list.min.js"></script>
